package dp.mobile.sbm;

import java.util.ArrayList;

import dp.mobile.sbm.model.News;
import dp.mobile.sbm.view.NewsAdapter;

import android.os.Bundle;
import android.widget.ListView;

public class NewsActivity extends TabActivity {
	public static final String TAG = "Daily News Act";
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		//Set family
		mFamily = TabActivity.NEWS_FAMILY;
		setContentView(R.layout.news);
		
		//Get data
		ArrayList<News> NewsData = new ArrayList<News>();
		NewsData.add(new News());
		NewsData.add(new News());
		NewsData.add(new News());
		NewsData.add(new News());
		NewsData.add(new News());
		
		//Set adapter
		ListView NewsList = (ListView) findViewById(R.id.news_list);
		if (NewsList != null) NewsList.setAdapter(new NewsAdapter(this, R.layout.news_item, NewsData));
		
		//Set listener
		setTabListener();
	}
}
